<?php
include_once("codelibrary/inc/variables.php");
function query($query,$extra="")
{
	$result = mysql_query($query) or die("Query execution error : ".mysql_error()."<br> Query : $query <br> Query Type : $extra");
	return $result;
}

$business_id = $_GET['business_id'];
$query = "select * from business_info where business_id='$business_id'";
$res = query($query);

$row = mysql_fetch_object($res);

?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="LTR" lang="en"><!-- InstanceBegin template="/Templates/tmp1.dwt.php" codeOutsideHTMLIsLocked="false" -->

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<title>Login-Online Appointment</title>
<script type="text/javascript" src="codelibrary/js/common.Js"></script>
<script type="text/javascript">
function submitform()
{
 
	if(ValidateForm(document.loginForm))
	{
	    return true;
	}
	else
	{
	    return false;
	}
}
</script>

<base >
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<title>Staff Management</title>
<script type="text/javascript" src="codelibrary/js/common.Js"></script>
<script type="text/javascript">
function submitform()
{
 
	if(ValidateForm(document.loginForm))
	{
	    return true;
	}
	else
	{
	    return false;
	}
}
</script>

<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" onload=document.loginForm.TR_User_Name.focus();>




<table cellpadding="0" cellspacing="0" border="0"><tr>
  <td bgcolor="#FF9B14" style="background:url(images/top.gif) repeat-x top; ">
    <table cellpadding="0" cellspacing="0" border="0" style="width:764px" align="center"> 
	<tr>
		<td>
			<table cellpadding="0" cellspacing="0" border="0" style="height:57">
				<tr>
				  <td height="46">
						<table cellpadding="0" cellspacing="0" border="0" style="height:3 ">
							<tr>
							  <td height="3" bgcolor="#2A2A2A"><a href="home.php"><img src="images/mm.gif" border="0" alt="" width="147" height="25"></a><br></td>
							  <td align="center" bgcolor="#2A2A2A"><a href="#"><span class="style1">Help</span></a></td>
							  <td align="center" bgcolor="#2A2A2A"><a href="#"><span class="style1">Support</span></a></td>
							  <td bgcolor="#2A2A2A">&nbsp;</td>
							</tr>
						</table>
						<h3 id="companyname"><?=$row->companyname?></h3>
				  </td>
				</tr>
			</table>


		</td>
	</tr>
	<tr>
		<td>





<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td valign="top" class="col_left">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_left">
	<tr><td width="100%">
		<table border="0" cellspacing="0" cellpadding="0">
<tr><td>

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  class="" height="91">
  <tr>
    <td align="center" height="91">
    <img border="0" src="images/logo.jpg" width="208" height="86"></td>
  </tr>
</table>
</td>
  </tr>
</table>
</td></tr>


          <tr>
            <td>
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="box_header_txt" height="48">
  <tr>
    <td style="background-image: url(images/1_bg2-2.gif)" height="1">
      <p style="margin-top: 16"></td>
  </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0"   style="border-bottom:12px solid #ffffff;">
  <tr>
    <td>
    <table border="0" width="100%" cellspacing="0" cellpadding="0"  style="margin-bottom:0px;background:#797878 url(images/1_line.gif) no-repeat left bottom;" class="box_body">
  <tr>
    <td  style="padding:3px 16px 8px 25px;"><p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      </td>
  </tr>
</table>
</td>
  </tr>
</table>
            </td>
          </tr>


          <tr>
            <td class="">&nbsp;
</td>
          </tr>

		</table>
	</td>
	<td><img src="images/spacer.gif" border="0" alt="" width="15" height="1"></td></tr>
</table>

    </td>

    <td width="100%" valign="top">
<table border="0" width="100%" cellspacing="0" cellpadding="0"  class="cont_header_txt">
  <tr>
    <td>
			<table cellpadding="0" cellspacing="0" border="0" class="cont_header_txt">
				<tr>
					<td><img src="images/1_q1.gif" border="0" alt="" width="45" height="39"></td>
					<td style="width:100%"><!-- InstanceBeginEditable name="EditRegion3" -->Customer Login </td>
					<td><img src="images/1_q2.gif" border="0" alt="" width="10" height="39"></td>
				</tr>
			</table>										 
			</td>
  </tr>
</table>


						<table cellpadding="0" cellspacing="0" border="0" style="border:0px solid #DEDEDE; border-width:0px 1px 0px 1px;">
							<tr><td style="background:#ffffff;border:0px solid #ffffff; border-width:18px 5px 10px 5px;">
		                        <!-- new_products //-->
	                            <form name="loginForm" action="customer_submit.php" 
method=post onSubmit="return submitform();">
  <table border="0" width="" cellspacing="0" cellpadding="0" class="box_width_cont product">
   <tr>
    <td><table width="95%" border="0" align="center" cellpadding="3" cellspacing="0" >
          <tr>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td colspan="2"></td>
          </tr>
          <tr>
            <td colspan="2" class="header-txt">Registered User : </td>
            </tr>
          <tr>
            <td colspan="2" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please enter your username and password to access your account. </td>
            </tr>
          <tr>
            <td colspan="2" >&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2" align="center">
			<?
										if(isset($logerr))
										{
											?>
											<P class="errTxt">
											<?
												if($logerr=="expire")
												{
													?>
													Activate Duration has been Expired
													<? 
												}
												if($logerr=="login")
												{
													?>Invalid Username/Password<? 
												}
												if($err=="type")
												{ 
													?>Unauthorise Page Access<? 
												}
												if($logerr=="register")
												{ 
													?>
													To access please login
													<? 
												}
												if($logerr=="logout")
												{ 
													?>
													You have been Logged Out Successfully !!
													<? 
												}
												if($err=="status")
												{ 
													?>
													This Account Is Currently Not Active
													<?
												}
												if($logerr=="success")
												{ 
													?>
													User created successfully. Please login.
													<?
												}
												if($logerr=="userlogged")

												{ 

													?>

      This user is already logged or you did not click "log off" button while exiting the site. Please wait for few minutes to get your login activated again. !!

      <? 

												}
												
											?>
											&nbsp;</P>
											
											<?
										}
										?>			    </td>
            </tr>
          <tr>
            <td colspan="2" align="right" class="errTxt"><? if(isset($_GET['msg'])){echo "Login To Access Site Administration of Online Appointment Manager";}?></td>
            </tr>
			<tr>
            <td colspan="2" align="right" >&nbsp;</td>
            </tr>
          <tr>
            <td width="47%" align="right" >&nbsp;&nbsp;&nbsp;User Name&nbsp;:&nbsp;&nbsp;&nbsp; </td>
            <td width="53%"><input name="username" type="text" id="username" /></td>
          </tr>
          <tr>
            <td align="right" >&nbsp;&nbsp;&nbsp;Password&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;</td>
            <td><input name="password" type="password" id="password" />            </td>
            </tr>
          <tr>
            <td >&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>
			<input type="hidden" name="business_id" value="<?=$row->business_id?>" />
			<input name="Submit" type="submit" class="button" value="Login" /></td>
          </tr>
          <tr>
            <td></td>
            <td align="right">&nbsp;&nbsp;&nbsp; </td>
          </tr>
          <tr>
            <td colspan="2" align="center">Don't have an account? Click <b><a href="customer-register.php?business_id=<?=$_REQUEST['business_id']?>">Register</a></b> to have a new account. <a href="customer-forgot-password.php?business_id=<?=$_REQUEST['business_id']?>"><strong>Forgot Password?</strong> </a></td>
            </tr>

  </table>
</td>
  </tr> 	
</table>

		<table border="0" cellspacing="0" cellpadding="0" align="center" class="box_width_cont product">
          <tr><td></td></tr>
        </table>
		
 
</form>
		                      </td></tr>

						</table>
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
								<td><img src="images/1_q4.gif" border="0" alt="" width="10" height="10"></td>
								<td style="width:100%; background-image:url(images/1_li1.gif)"></td>
								<td><img src="images/1_q3.gif" border="0" alt="" width="10" height="10"></td>
							</tr>
						</table>
						


		
		
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <br>
		                <table cellpadding="0" cellspacing="0" border="0" style="height:98px; background-image:url(images/bot.gif)">
                          <tr>
                            <td><table cellpadding="0" cellspacing="0" border="0" class="footer">
                                <tr>
                                  <td><img src="images/spacer.gif" border="0" alt="" width="25" height="1"></td>
                                  <td style="width:207px"><br style="line-height:49px">
                                      <img src="images/p1.gif" border="0" alt="" width="145" height="24"><br></td>
<td style="width:532px"><br style="line-height:44px">                                    <br>
                                  </td>                                </tr>
                            </table></td>
                          </tr>
                        </table></td>

    <td class="col_right">

<table border="0"cellspacing="0" cellpadding="0" class="box_width_right">
	<tr><td></td>
		<td width="100%">
			<table border="0" cellspacing="0" cellpadding="0">
				<tr><td></td></tr>
			</table>
		</td>
	</tr>
</table>


    </td>
  </tr>
</table>



		</td>
	</tr>
	<tr>
		<td>&nbsp;</td>
	</tr>
</table></td></tr></table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center"></td>
  </tr>
</table>
</body>

</html>